Skip to content

Rename the diff section metrics module#149

Closed
benvinegar wants to merge 1 commit intomainfrom
pi/rename-diff-section-metrics
Closed

Rename the diff section metrics module#149
benvinegar wants to merge 1 commit intomainfrom
pi/rename-diff-section-metrics

Conversation

@benvinegar
Copy link
Copy Markdown
Member

Summary

  • rename sectionHeights.ts to diffSectionMetrics.ts so the module name matches the richer geometry data it exports
  • update the benchmark, DiffPane, and unit tests to import the renamed module
  • rename the focused test file so the test suite uses the same terminology

Testing

  • bun run typecheck
  • bun test test/diff-section-metrics.test.ts test/ui-lib.test.ts test/ui-components.test.tsx test/app-interactions.test.tsx

This PR description was generated by Pi using OpenAI o3

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 31, 2026

Greptile Summary

This PR is a pure rename: src/ui/lib/sectionHeights.tssrc/ui/lib/diffSectionMetrics.ts (and the companion test file test/section-heights.test.tstest/diff-section-metrics.test.ts). No logic, exports, or types were changed — only import paths across four callsites (DiffPane.tsx, benchmarks/large-stream-profile.ts, test/ui-components.test.tsx, test/ui-lib.test.ts) were updated to match the new filename.

  • All six references to the old sectionHeights module path have been updated; a codebase-wide search confirms no stale imports remain.
  • The new name diffSectionMetrics better reflects the richness of the geometry data the module exports (DiffSectionMetrics, DiffSectionRowMetric, measureDiffSectionMetrics).
  • No functional changes, no type changes, no test logic changes.

Confidence Score: 5/5

Safe to merge — purely a rename with no logic changes and no stale import references remaining.

All changed files are mechanical import-path updates accompanying a file rename. No functional code was modified, no exports changed, and a full codebase search confirms zero remaining references to the old sectionHeights path.

No files require special attention.

Important Files Changed

Filename Overview
src/ui/lib/diffSectionMetrics.ts File renamed from sectionHeights.ts — no content changes, all exports remain identical.
src/ui/components/panes/DiffPane.tsx Import path updated from ../../lib/sectionHeights to ../../lib/diffSectionMetrics — no other changes.
test/diff-section-metrics.test.ts File renamed from section-heights.test.ts and import path updated — test logic unchanged.
benchmarks/large-stream-profile.ts Import path updated to diffSectionMetrics — no other changes.
test/ui-components.test.tsx Import path updated to diffSectionMetrics — no other changes.
test/ui-lib.test.ts Import path updated to diffSectionMetrics — no other changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[benchmarks/large-stream-profile.ts] -->|imports measureDiffSectionMetrics| D
    B[src/ui/components/panes/DiffPane.tsx] -->|imports measureDiffSectionMetrics\nDiffSectionMetrics\nDiffSectionRowMetric| D
    C[test/ui-components.test.tsx] -->|imports measureDiffSectionMetrics| D
    E[test/ui-lib.test.ts] -->|imports estimateDiffBodyRows\nmeasureDiffSectionMetrics| D
    F[test/diff-section-metrics.test.ts] -->|imports measureDiffSectionMetrics| D

    D["src/ui/lib/diffSectionMetrics.ts\n(renamed from sectionHeights.ts)"]

    style D fill:#4a90d9,color:#fff
Loading

Reviews (1): Last reviewed commit: "Rename the diff section metrics module" | Re-trigger Greptile

@benvinegar
Copy link
Copy Markdown
Member Author

Going to do a bigger rename.

@benvinegar benvinegar closed this Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant